﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ZF.BLL
{
    
    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
    public class PageArgumentAttribute : Attribute
    {

        public PageArgumentAttribute()
        {
            BindOperType = PageOperType.None;
        }
        /// <summary>
        /// 参数名称
        /// </summary>
        public string Key { get; set; }
        /// <summary>
        /// 参数默认值，如果传递参数未找到，则使用默认值为成员赋值
        /// </summary>
        public object DefaultValue { get; set; }
        private bool _canNull = true;
        /// <summary>
        /// 是否允许为空，默认允许为空
        /// </summary>
        public bool CanNull { get { return _canNull; } set { _canNull = value; } }
        /// <summary>
        /// 绑定页面操作类型,如果不设置该值则绑定到所有操作类型
        /// </summary>
        public PageOperType BindOperType { get;set; }
        /// <summary>
        /// 错误消息
        /// </summary>
        public string ErrorMsg { get; set; }
    }

}
